<template>
  <div class="main_box2">
    <div v-for="(v,i) in getmain" :key="i">
      <div class="main_n">
        <h3>{{v.name}}</h3>
        <p>进入场景</p>
      </div>
      <div class="main_m">
        <div v-for="img in v.templates">
            <img :src="img.designTemplateImageUrl" alt="">
        </div>
      </div>
      <div class="main_b">
        <button>更多</button>
        <button>换一批</button>
      </div>
    </div>
  </div>
</template>

<script>
import axios from "axios";

export default {
  data() {
    return {
      getmain: null,
      img: null,
    };
  },
  mounted() {
    axios
      .get(
        "api/mobile/main/getSceneDetail.do?_dataType=json&_dataClientType=3&_dataClientType=3&client_type=40&page_no=2"
      )
      .then((res) => {
        this.getmain = res.data.body.data.sceneDetail;
      })
      .catch(function (err) {
        console.log(err);
      });
  },
};
</script>

<style>
.main_box2 {
  margin-bottom: 60px;
  /* 上 右 下 左 */
  padding: 10px 0px 20px 0px;
  background: #fff;
}
.main_n {
  display: flex;
  justify-content: space-between;
  margin: 2vh 3vw;
}
.main_m {
  width: 100vw;
  height: 55vh;
  /* border: 1px solid red; */
  display: flex;
   flex-wrap:wrap
}
.main_m>div{
     width: 30vw;
  height: 25vh;
  /* border: 1px solid red; */
  margin-left: 2vw;
}
.main_m>div>img {
  width: 100%;
  height: 100%;
}
.main_b {
  display: flex;
  justify-content: space-between;
  margin: 2vh 3vw;
}

.main_b button {
  width: 40vw;
  height: 5vh;
  line-break: 5vh;
  border-radius: 3vh;
  outline: none;
  border: none;
}
</style>